import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

import home from '../pages/home.vue'
import home_report from '../pages/home_report.vue'
import login from '../pages/login.vue'
import reg from '../pages/reg.vue'
import news from '../pages/news.vue'
import message from '../pages/message.vue'
import detail_message from '../pages/detail_message.vue'
import user from '../pages/user.vue'
import detail from '../pages/detail.vue'
import NoPage from '../pages/no-page.vue'

let routes=[
  {path:'/home',component:home},
  {path:'/home_report',component:home_report},
  {path:'/login',component:login},
  {path:'/reg',component:reg},
  {path:'/news',component:news},
  {path:'/message',component:message},
  {path:'/detail/:_id',component:detail,name:'detail'},
  {path:'/detail_message/:_id',component:detail_message,name:'detail'},
  {path:'/user',component:user},
  {path:'/NoPage',component:NoPage},
  {path:'/',redirect:'/home'},
  {path:'*',component:NoPage},
];

let router = new VueRouter({
  routes,
  
  mode:"history"
});
export default router;